﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Runtime.Serialization;
using System.ComponentModel;
using System.Xml.Serialization;

namespace Snipebay.DataModels
{
	[DataContractAttribute(Namespace = "Snipebay.ServiceDataContract", Name = "BaseEntity")]
	[Serializable]
    public abstract class BaseEntity : INotifyPropertyChanged
    {
        public BaseEntity()
        { }
        public BaseEntity(IDataRecord dataRecord)
        { }
        protected virtual void FillExtendedProperties(IDataRecord dataRecord)
        {
        }

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        protected void NotifyPropertyChanged(String info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(info));
            }
        }

        #endregion INotifyPropertyChanged Members
    }
}
